﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace SkinableGUISchema
{
    [System.Xml.Serialization.XmlRoot()]
    public class SkinWindow : SkinControl
    {
        public string Title;
        public SkinWindowStyle WindowStyle;
    }

    public class SkinControl
    {
        public UInt32 Id;
        public SkinControl[] Controls;
        public SkinImage BackgroundImage;
        public SkinColor BackgroundColor;
        public SkinFont Font;
        public SkinRectangle Position;
        public SkinControlStyle Style;
        public SkinControlTypeEnum ControlType;
        public bool TransparentBackground;
    }

    public class SkinImage
    {
        public string Path;
        public SkinColor TransparentColor;
        public bool Transparent = false;
    }

    public class SkinPictureControl : SkinControl
    {
        public SkinImage Image;
    }
    
    public class SkinColor
    {
        public int R;
        public int G;
        public int B;
    }

    public class SkinFont
    {
        public string Name;
        public int Size;
        public bool AntiAlias;
        public bool UnderLine;
        public SkinColor TextColor, BackgroundColor;
    }

    public class SkinRectangle
    {
        public double Top, Left, Right, Bottom;
    }

    public class SkinControlStyle
    {
    }

    public class SkinWindowStyle
    {
        public bool CaptionBar = false;

        public bool MaximizeBox = false;
        public bool MinimizeBox = false;
    }

    public class SkinButton : SkinControl
    {
        public string ActionName;
        public string ButtonText;
    }

    public class SkinBitmapButton : SkinButton
    {
        public SkinImage Normal, Selected, Focus, Disabled;
    }

    public class SkinListBox : SkinControl
    {
        public bool HorzScroll, VertScroll;
        public SkinScrollBar HorzScrollBar, VertScrollBar;
    }

    public class SkinScrollBar
    {
        public SkinImage IncImage, DecImage, ThumbImage, BackgroundImage;
        public SkinScrollBarPos Position;
    }

    public enum SkinControlTypeEnum
    {
        Control,
        Window,
        Button,
        BitmapButton,
        ListBox,
        Picture,
    };

    public enum SkinScrollBarDock
    {
        Top,
        Left,
        Right,
        Bottom
    };

    public class SkinScrollBarPos
    {
        public SkinScrollBarDock Dock;
        public SkinRectangle Size;
    }
}
